require('../css/badge.less');

window.onload = function () {
    let mainDom = document.querySelector('main');
    let iconShangyigeDom = document.querySelector('.icon-xiangzuo1');

    let arr = [

        { img: require('../img/mybadge01.jpg'), text: '连续训练天数' },
        { img: require('../img/mybadge02.jpg'), text: '累积训练天数' },
        { img: require('../img/mybadge03.jpg'), text: '训练次数' },
        { img: require('../img/mybadge04.jpg'), text: '跑步次数' },
        { img: require('../img/mybadge05.jpg'), text: '骑行次数' },
        { img: require('../img/mybadge06.jpg'), text: '明星圈友' },
        { img: require('../img/mybadge07.jpg'), text: '评论达人' },
        { img: require('../img/mybadge08.jpg'), text: '运动铁粉' },
        { img: require('../img/mybadge09.jpg'), text: '' },

    ]
    let html = '';
    arr.forEach(item=>{
        html += `
        <div class="item">
            <img src="${item.img}" alt="">
            <span class="text">${item.text}</span>
        </div>
            `;
    })
    mainDom.innerHTML = html;




    iconShangyigeDom.addEventListener('click', function () {
        location.href = './mine.html';
    })
};